package tx;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import tx.controller.BookController;

@SpringJUnitConfig(locations = "classpath:bean.xml")
@Component
public class TestBookTx {
    @Autowired
    private BookController bookController;

    @Test
    public void buyBook() {
        //bookController.buyBook(1,1);

        Integer[] bookIds = {1,2};
        bookController.checkout(bookIds,1);
    }
}
